From 3a96d5c7a9e521810c356de0f9401ecaf767cc98 Mon Sep 17 00:00:00 2001 From: Toby Hughes Date: Mon, 26 Feb 2018 15:33:23 -0800 Subject: [PATCH] Added tests for clean with verbose output --- tests/clean.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/clean.rs b/tests/clean.rs index 0cf552371..824c3a3ad 100644 --- a/tests/clean.rs +++ b/tests/clean.rs @@ -237,3 +237,30 @@ fn registry() { assert_that(p.cargo("build"), execs().with_status(0)); } + +#[test] +fn clean_verbose(){ + let p = project("foo") + .file("Cargo.toml", r#" + [package] + name = "foo" + version = "0.0.1" + + [dependencies] + bar = "0.1" + "#) + .file("src/main.rs", "fn main() {}") + .build(); + + Package::new("bar", "0.1.0").publish(); + + assert_that(p.cargo("build"), + execs().with_status(0)); + assert_that(p.cargo("clean").arg("-p").arg("bar").arg("--verbose"), + execs().with_status(0).with_stderr("\ +[REMOVING] [..] +[REMOVING] [..] +")); + assert_that(p.cargo("build"), + execs().with_status(0)); +} -- 2.30.2